package com.javacv.plus.examples;

import com.javacv.plus.platform.PlatformDetector;
import com.javacv.plus.platform.Platform;
import com.javacv.plus.platform.SystemInfo;

/**
 * 快速测试程序
 */
public class QuickTest {
    
    public static void main(String[] args) {
        System.out.println("=== JavaCV Plus 快速测试 ===");
        
        try {
            // 测试平台检测
            Platform platform = PlatformDetector.detectCurrentPlatform();
            System.out.println("✅ 平台检测成功: " + platform.getPlatformString());
            
            // 测试系统信息获取
            SystemInfo systemInfo = PlatformDetector.getSystemInfo();
            System.out.println("✅ 系统信息获取成功:");
            System.out.println("   - OS: " + systemInfo.getOsName());
            System.out.println("   - 架构: " + systemInfo.getOsArch());
            System.out.println("   - CPU核心数: " + systemInfo.getAvailableProcessors());
            System.out.println("   - 总内存: " + (systemInfo.getMaxMemory() / 1024 / 1024) + "MB");
            
            // 测试JavaCV依赖是否能加载
            try {
                Class.forName("org.bytedeco.javacv.OpenCVFrameConverter");
                System.out.println("✅ JavaCV依赖加载成功");
            } catch (ClassNotFoundException e) {
                System.out.println("❌ JavaCV依赖加载失败: " + e.getMessage());
            }
            
            System.out.println("\n🎉 测试完成！项目基本功能正常");
            
        } catch (Exception e) {
            System.err.println("❌ 测试失败: " + e.getMessage());
            e.printStackTrace();
        }
    }
} 